﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace POVRay {
    public class Angle2 {
        public float Horizontal { get; set; }
        public float? Vertical { get; set; }

        public Angle2(float horizontal) {
            Horizontal = horizontal;
        }

        public Angle2(float horizontal, float vertical) {
            Horizontal = horizontal;
            Vertical = vertical;
        }

        public static implicit operator Angle2(float horizontal) {
            return new Angle2(horizontal);
        }

        public override string ToString() {
            string verticalString = Vertical.HasValue ? ", " + Vertical.Value.POVRayString() : "";
            return "angle " + Horizontal.POVRayString() + verticalString;
        }
    }
}
